package com.yxx.servicealbumclient;

import com.yxx.model.album.AlbumAttributeValue;
import com.yxx.model.album.AlbumInfo;
import com.yxx.result.Result;
import com.yxx.servicealbumclient.impl.AlbumDegradeFeignClient;
import com.yxx.vo.album.AlbumStatVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @author yuxiangxun
 * @date 2025/3/17
 * @apiNote
 */
@FeignClient(value = "service-album",fallback = AlbumDegradeFeignClient.class)
public interface AlbumFeignClient {

    /**
     * 获取专辑属性值列表
     * @param albumId
     * @return
     */
    @GetMapping("/api/album/albumInfo/findAlbumAttributeValue/{albumId}")
    Result<List<AlbumAttributeValue>> findAlbumAttributeValue(@PathVariable("albumId") Long albumId);

    /**
     * 获取专辑信息
     * @param id
     * @return
     */
    @GetMapping("/api/album/albumInfo/getAlbumInfo/{id}")
    Result<AlbumInfo> getAlbumInfo(@PathVariable("id") Long id);

    /**
     * 通过专辑Id 获取到专辑状态信息
     * @param albumId
     * @return
     */
    @GetMapping("/api/album/albumInfo/getAlbumStatVo/{albumId}")
    Result<AlbumStatVo> getAlbumStatVo(@PathVariable Long albumId);

}
